import os

from dotenv import load_dotenv

load_dotenv()

# path
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
STATIC_PATH = os.path.join(BASE_DIR, 'static')
# UPLOADS_PATH = os.path.join(BASE_DIR, 'uploads')

# csrf
WTF_CSRF_ENABLED = True if 'True' == os.getenv('WTF_CSRF_ENABLED') else False

# log
LOG_PATH = os.path.join(BASE_DIR, 'logs')
LOG_PATH_ERROR = os.path.join(LOG_PATH, 'error.log')
LOG_PATH_INFO = os.path.join(LOG_PATH, 'info.log')
LOG_FILE_MAX_BYTES = 100 * 1024 * 1024
LOG_FILE_BACKUP_COUNT = 10

# db
PONY = {
    'provider': 'mysql',
    'host': os.getenv('PONY_HOST'),
    'user': os.getenv('PONY_USER'),
    'password': os.getenv('PONY_PASSWORD'),
    'db': os.getenv('PONY_DB')
}
